from ctypes import *

aaa = windll.LoadLibrary('user32.dll')
aaa.LockWorkStation()